window.onload = function () {
    var imgs = Array("./img/img1.jpg", "./img/img2.jpg", "./img/img3.jpg");
    var image = document.getElementById("banner");
    var i = 0;
    setInterval(function () {
        if(i <= 2){
            image.src = imgs[i];
            i++;
        }else{
            i = 0;
        }
    }, 2000);
}